package com.hailong.zyt.service.impl;

import com.hailong.zyt.beans.Admin;
import com.hailong.zyt.mapper.AdminMapper;
import com.hailong.zyt.service.AdminService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author hailong
 * @since 2021-05-17
 */
@Service
public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements AdminService {


    @Override
    public Admin login(Admin user) {
        Admin admin = this.getById(user.getAdmId());
        if(admin != null && admin.getAdmPassword().equals(user.getAdmPassword())) {
            return admin;
        }
        else {
            return null;
        }
    }
}
